#!/usr/bin/env ruby

rubygem_name = *ARGV

abort "Usage: script/release_reserved_namespace [GEM_NAME]" if rubygem_name.nil?

ENV["RAILS_ENV"] ||= "production"
require_relative "../config/environment"

rubygem = Rubygem.find_by_name!(rubygem_name)
rubygem.release_reserved_namespace!

puts "#{rubygem_name} was released."
